package com.shynin.service;

import com.shynin.common.bean.dto.UserDTO;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by Shynin on 2019/1/29.
 */
@FeignClient(name = "admin")
public interface IUserService {

    @RequestMapping(value = "/user/id/{id}", method = RequestMethod.GET)
    UserDTO findById(@PathVariable("id") Long id);

    @RequestMapping(value = "/user/name/{name}", method = RequestMethod.GET)
    UserDTO findByName(@PathVariable("name") String name);
}
